package com.huang.article.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * @author han
 * @since 2022-02-08 14:19:22
 */
@Data
@NoArgsConstructor
@TableName("t_article")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
public class Article extends BaseEntity implements Serializable {
    private static final long serialVersionUID = -8558492998811790084L;

    private String userId;
    @NotBlank(message = "请选择标签")
    private String tagId;
    @NotBlank(message = "请选择分类")
    private String categoryId;
    @NotBlank(message = "请添加标题")
    private String title;
    @NotBlank(message = "请添加文章内容")
    private String content;
    private Integer likeNum = 0;
    private Integer disLikeNum = 0;
    private Integer commentNum = 0;
    private Integer views = 0;
    private Boolean top = Boolean.FALSE;
    private long topDate;
    private Boolean visible = Boolean.TRUE;
    private Boolean privates = Boolean.FALSE;
    private String checkUserId;
    private long checkDate;

}
